﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DHBC.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Game.DHBC" %>
<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <%
        var get_dhbc = from p in new TblDHBCQuestionController().FetchAll() orderby p.Id descending select p;
    %>
    <div id="dhbc" class="game-content w3-row">
        <div class="game-left w3-third w3-border-right w3-border-teal">
            <header class="w3-center w3-padding-4">
                <label>Danh sách câu hỏi</label>
            </header>
            <div class="w3-padding">
                <ul id="game-question-list" class="game-question-list w3-ul w3-light-grey">
                    <%foreach (TblDHBCQuestion dhbc in get_dhbc) { %>
                    <li onclick="dhbc_edit(<%=dhbc.Id %>)"><%=dhbc.Name %></li>
                    <%} %>
                </ul>
            </div>
            <div class="w3-padding-4 w3-center">
                <a onclick="game_add_question()" class="game-add-question-btn w3-btn w3-teal">Thêm câu hỏi</a>
            </div>
        </div>
        <div class="game-right w3-twothird">
            <div id="game-add-question-form">
                <header class="w3-center w3-padding-4">
                    <label>Thêm câu hỏi</label>
                </header>
                <div class="w3-row w3-padding">
                    <label class="w3-col l2">Tên câu hỏi</label><input id="add_dhbc_name" type="text" class="game-text w3-light-grey w3-col l10" />
                </div>
                <div class="w3-row w3-padding">
                    <label class="w3-col l2">Hình ảnh câu hỏi</label>
                    <input id="add_dhbc_question" type="text" class="game-text w3-light-grey w3-col l9" /><a title="Xem trước" class="game-review-img-btn w3-btn w3-teal w3-col l1"><i class="fa fa-refresh"></i></a>
                </div>
                <div class="w3-row w3-padding">
                    <label class="w3-col l2">Xem trước</label>
                    <div class="w3-col l10 w3-light-grey w3-center">
                        <img src="../Content/testdata/picture/no_image.png" id="add_dhbc_review" class="game-review-img" />
                    </div>
                </div>
                <div class="w3-row w3-padding">
                    <label class="w3-col l2">Đáp án</label><input id="add_dhbc_answer" type="text" class="game-text w3-light-grey w3-col l10" />
                </div>
                <div class="w3-row w3-padding w3-center">
                    <a onclick="btn_add_dhbc()" class="w3-btn w3-teal"><i class="fa fa-check"></i>&nbsp;Xác nhận</a>
                </div>
            </div>
            <div id="game-edit-question-form" class="game-edit-question-form">
                
            </div>
        </div>
    </div>
</body>
</html>
